// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_SOB
// * CreateDate    : 2014-06-05 18:30:17
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:17
// * LastChanger   : 2014-06-05 18:30:17
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstSobEntity : EntityBase
    {
        public MstSobTable TableSchema
        {
            get
            {
                return MstSobTable.Current;
            }
		}
		
		public MstSobEntity()
        {

        }
		
		public MstSobEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
			this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
			this.CompanyId = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_ID"]));
			this.CompanyName = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_NAME"]));
			this.CompanyCode = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_CODE"]));
			this.Add = Convert.ToString(CommonFunctions.ToObject(dr["ADD"]));
			this.Tel = Convert.ToString(CommonFunctions.ToObject(dr["TEL"]));
        }
		
		public MstSobEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
			this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
			this.CompanyId = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_ID"]));
			this.CompanyName = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_NAME"]));
			this.CompanyCode = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_CODE"]));
			this.Add = Convert.ToString(CommonFunctions.ToObject(dr["ADD"]));
			this.Tel = Convert.ToString(CommonFunctions.ToObject(dr["TEL"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstSobTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstSobTable.C_ID)); }
            set { SetData(MstSobTable.C_ID, value); }
        }
		
        [DataMember]
        public string Name
        {
            get { return Convert.ToString(GetData(MstSobTable.C_NAME)); }
            set { SetData(MstSobTable.C_NAME, value); }
        }
		
        [DataMember]
        public string Type
        {
            get { return Convert.ToString(GetData(MstSobTable.C_TYPE)); }
            set { SetData(MstSobTable.C_TYPE, value); }
        }
		
        [DataMember]
        public string CompanyId
        {
            get { return Convert.ToString(GetData(MstSobTable.C_COMPANY_ID)); }
            set { SetData(MstSobTable.C_COMPANY_ID, value); }
        }
		
        [DataMember]
        public string CompanyName
        {
            get { return Convert.ToString(GetData(MstSobTable.C_COMPANY_NAME)); }
            set { SetData(MstSobTable.C_COMPANY_NAME, value); }
        }
		
        [DataMember]
        public string CompanyCode
        {
            get { return Convert.ToString(GetData(MstSobTable.C_COMPANY_CODE)); }
            set { SetData(MstSobTable.C_COMPANY_CODE, value); }
        }
		
        [DataMember]
        public string Add
        {
            get { return Convert.ToString(GetData(MstSobTable.C_ADD)); }
            set { SetData(MstSobTable.C_ADD, value); }
        }
		
        [DataMember]
        public string Tel
        {
            get { return Convert.ToString(GetData(MstSobTable.C_TEL)); }
            set { SetData(MstSobTable.C_TEL, value); }
        }
		
		#endregion
	}
	
	
}	

